using System;
using System.ComponentModel.DataAnnotations;

namespace BabyShop.WebSite.Models
{
    [Table("Permissions")]
    public class Permission
    {
        [Key]
        public Guid PermissionGuid { get; set; }

        public Guid RoleGuid { get; set; }

        public Guid UserGuid { get; set; }

        [Required]
        public Guid ActionGuid { get; set; }

        [Required]
        public string PermissionName { get; set; }

        public CommonColumns CommonColumns { get; set; }

        [ForeignKey("RoleGuid")]
        public virtual Role Role { get; set; }

        [ForeignKey("UserGuid")]
        public virtual User User { get; set; }

        [ForeignKey("ActionGuid")]
        public Actions Action { get; set; }
    }
}